<script>
/*
 * @Author: wzh 
 * @Date: 2020-12-28 17:42:23 
 * @Last Modified by: 1521620993@qq.com
 * @Last Modified time: 2021-01-20 11:29:42
 */
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>02-波浪圆</title>
</head>
<body>
<style>
* {
  margin: 0;
  padding: 0;
}
body {
  background-color: #9c27b0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
body .loader {
  position: relative;
  width: 300px;
  height: 300px;
  transform-style: preserve-3d;
  perspective: 500px;
  perspective-origin: -10px 0px;
  transform: rotateX(60deg);
}
body .loader span {
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 0 #ccc, inset 0 5px 0 #ccc;
  position: absolute;
  animation: animate 3s ease-in-out infinite;
}
body .loader span:nth-child(1) {
  top: 0px;
  bottom: 0px;
  right: 0px;
  left: 0px;
  animation-delay: 1.4s;
}
body .loader span:nth-child(2) {
  top: 10px;
  bottom: 10px;
  right: 10px;
  left: 10px;
  animation-delay: 1.3s;
}
body .loader span:nth-child(3) {
  top: 20px;
  bottom: 20px;
  right: 20px;
  left: 20px;
  animation-delay: 1.2s;
}
body .loader span:nth-child(4) {
  top: 30px;
  bottom: 30px;
  right: 30px;
  left: 30px;
  animation-delay: 1.1s;
}
body .loader span:nth-child(5) {
  top: 40px;
  bottom: 40px;
  right: 40px;
  left: 40px;
  animation-delay: 1s;
}
body .loader span:nth-child(6) {
  top: 50px;
  bottom: 50px;
  right: 50px;
  left: 50px;
  animation-delay: 0.9s;
}
body .loader span:nth-child(7) {
  top: 60px;
  bottom: 60px;
  right: 60px;
  left: 60px;
  animation-delay: 0.8s;
}
body .loader span:nth-child(8) {
  top: 70px;
  bottom: 70px;
  right: 70px;
  left: 70px;
  animation-delay: 0.7s;
}
body .loader span:nth-child(9) {
  top: 80px;
  bottom: 80px;
  right: 80px;
  left: 80px;
  animation-delay: 0.6s;
}
body .loader span:nth-child(10) {
  top: 90px;
  bottom: 90px;
  right: 90px;
  left: 90px;
  animation-delay: 0.5s;
}
body .loader span:nth-child(11) {
  top: 100px;
  bottom: 100px;
  right: 100px;
  left: 100px;
  animation-delay: 0.4s;
}
body .loader span:nth-child(12) {
  top: 110px;
  bottom: 110px;
  right: 110px;
  left: 110px;
  animation-delay: 0.3s;
}
body .loader span:nth-child(13) {
  top: 120px;
  bottom: 120px;
  right: 120px;
  left: 120px;
  animation-delay: 0.2s;
}
body .loader span:nth-child(14) {
  top: 130px;
  bottom: 130px;
  right: 130px;
  left: 130px;
  animation-delay: 0.1s;
}
body .loader span:nth-child(15) {
  top: 140px;
  bottom: 140px;
  right: 140px;
  left: 140px;
  animation-delay: 0s;
}
@-moz-keyframes animate {
  0%, 100% {
    transform: translateZ(-100px);
  }
  50% {
    transform: translateZ(100px);
  }
}
@-webkit-keyframes animate {
  0%, 100% {
    transform: translateZ(-100px);
  }
  50% {
    transform: translateZ(100px);
  }
}
@-o-keyframes animate {
  0%, 100% {
    transform: translateZ(-100px);
  }
  50% {
    transform: translateZ(100px);
  }
}
@keyframes animate {
  0%, 100% {
    transform: translateZ(-100px);
  }
  50% {
    transform: translateZ(100px);
  }
}
</style>
<div class="loader">
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
</div>
<!-- 
@keyframes animate
  0%, 100%
    transform translateZ(-100px)
  50%
    transform translateZ(100px)
*
  margin 0
  padding 0
body
  background-color #9c27b0
  display flex
  justify-content center
  align-items center
  min-height 100vh
  .loader
    position relative
    width 300px
    height 300px
    transform-style preserve-3d
    perspective 500px
    perspective-origin: -10px 0px;
    transform rotateX(60deg) 
    span
      border: 5px solid #fff
      border-radius 50%
      box-shadow 0 5px 0 #ccc, inset 0 5px 0 #ccc
      position absolute
      animation animate 3s ease-in-out infinite
      for row in 1..15
        &:nth-child({row})
          top (row - 1) * 10px
          bottom (row - 1) * 10px
          right (row - 1) * 10px
          left (row - 1) * 10px
          animation-delay 1.5s - (row / 10)
-->
</body>
</html>